import axios from 'axios'

const api = axios.create({
    baseURL: '/api',
})

export default {
    login(password) {
        return api.post('/auth', { password })
    },
    getSystemInfo() {
        return api.get('/system')
    },
    getPort() {
        return api.post('/report')
    },
    triggerVOS(port) {
        return api.post('/vos', { port })
    },
    getIPList() {
        return api.get('/ip')
    },
    getVOSIdentifier() {
        return api.get('/vos/identifier')
    },
    addIP(ip) {
        return api.post('/ip', { ip })
    },
    deleteIP(id) {
        return api.delete(`/ip/${id}`)
    },
    getBlindArea(data) {
        return api.post('/blind', { data })
    }
}